# Helper script to run backend from project root
param(
    [int]$Port = 8000
)

$ServerDir = Join-Path $PSScriptRoot "server"
$RunScript = Join-Path $ServerDir "run_server.ps1"

if (-not (Test-Path $RunScript)) {
    Write-Error "Cannot find server/run_server.ps1 under $PSScriptRoot"
    exit 1
}

& $RunScript -Port $Port